
// 类型映射：基于一种类型产生一个新的类型

interface Person {
    name: string;
    age: number;
    height: number;
}

type TypeTrunString<T> = {
    [P in keyof T]: string;
}
// ====Partial====
type TypeToKeXuan<T> = {
    [P in keyof T]?: T[P];
}
// ====Required====
type TypeToKeBiTian<T> = {
    [P in keyof T]-?: T[P];
}
// ====Readonly====
type TypeToReadonly<T> = {
    readonly [P in keyof T]: T[P];
}

export {}